// src/api/forum.js
import { post } from '@/utils/request'

export default {
  // 创建帖子
  createPost: data => post('/api/forum/post/create', data),
  // 删除帖子
  deletePost: (id, userId, role) => post(`/api/forum/post/delete/${id}`, { userId, role }),
  // 创建回帖
  createReply: data => post('/api/forum/reply/create', data),
  // 删除回帖
  deleteReply: (id, userId, role) => post(`/api/forum/reply/delete/${id}`, { userId, role }),
  // 获取帖子分页列表
  getPostPage: data => post('/api/forum/post/page', data),
  // 获取回帖分页列表
  getReplyPage: data => post('/api/forum/reply/page', data)
}